package shop.up.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import shop.up.model.product.BaseTrademark;
import shop.up.product.mapper.BaseTrademarkMapper;
import shop.up.product.service.BaseTrademarkService;

/**
 * 品牌服务接口实现 {@link BaseTrademarkServiceImpl}
 *
 * @author Kevin
 * @date 2023/2/15
 */
@Service
public class BaseTrademarkServiceImpl
        extends ServiceImpl<BaseTrademarkMapper, BaseTrademark>
        implements BaseTrademarkService {

    /**
     * 分页查询
     * @param pageParam
     * @return
     */
    @Override
    public IPage<BaseTrademark> getPage(Page<BaseTrademark> pageParam) {
        // 构建查询器
        QueryWrapper<BaseTrademark> queryWrapper = new QueryWrapper<>();
        queryWrapper.orderByAsc("id");

        IPage<BaseTrademark> page = baseMapper.selectPage(pageParam, queryWrapper);

        return page;
    }
}
